#include <stdio.h>
#include <stdlib.h>
#include <string.h>


int main()
{
    int a = 0x666;
    int b = 0x777;
    int c;

	c = a + b;
	printf("%x + %x = %x\n", a, b, c);

	c = b - a;
	printf("%x - %x = %x\n", b, a, c);

	return 0;
}

#if 0

/*
 * intel
 */
0000000000001149 <main>:
    1149:	f3 0f 1e fa          	endbr64 
    114d:	55                   	push   %rbp
    114e:	48 89 e5             	mov    %rsp,%rbp
    1151:	48 83 ec 10          	sub    $0x10,%rsp		// rsp-=0x10
    1155:	c7 45 f4 66 06 00 00 	movl   $0x666,-0xc(%rbp)	// (rbp-0xc)=0x666
    115c:	c7 45 f8 77 07 00 00 	movl   $0x777,-0x8(%rbp)	// (rbp-0x8)=0x777
    1163:	8b 55 f4             	mov    -0xc(%rbp),%edx		// edx=0x666
    1166:	8b 45 f8             	mov    -0x8(%rbp),%eax		// eax=0x777
    1169:	01 d0                	add    %edx,%eax		// eax=0x666+0x777
    116b:	89 45 fc             	mov    %eax,-0x4(%rbp)		// (rbp-0x4)=0xddd
    116e:	8b 4d fc             	mov    -0x4(%rbp),%ecx		// ecx=0xddd
    1171:	8b 55 f8             	mov    -0x8(%rbp),%edx		// edx=0x777
    1174:	8b 45 f4             	mov    -0xc(%rbp),%eax		// eax=0x666
    1177:	89 c6                	mov    %eax,%esi		// esi=0x666
    1179:	48 8d 3d 84 0e 00 00 	lea    0xe84(%rip),%rdi        # 2004 <_IO_stdin_used+0x4> rdi=rip+0xe84
    1180:	b8 00 00 00 00       	mov    $0x0,%eax		// eax=0
    1185:	e8 c6 fe ff ff       	callq  1050 <printf@plt>	// printf(rdi, esi, edx, ecx)
    118a:	8b 45 f8             	mov    -0x8(%rbp),%eax		// eax=0x777
    118d:	2b 45 f4             	sub    -0xc(%rbp),%eax		// eax=0x777-0x666
    1190:	89 45 fc             	mov    %eax,-0x4(%rbp)		// (rbp-0x4)=eax=0x111
    1193:	8b 4d fc             	mov    -0x4(%rbp),%ecx		// ecx=0x111
    1196:	8b 55 f4             	mov    -0xc(%rbp),%edx		// edx=0x666
    1199:	8b 45 f8             	mov    -0x8(%rbp),%eax		// eax=0x777
    119c:	89 c6                	mov    %eax,%esi		// esi=eax
    119e:	48 8d 3d 6d 0e 00 00 	lea    0xe6d(%rip),%rdi        # 2012 <_IO_stdin_used+0x12> rdi=rip+e6d
    11a5:	b8 00 00 00 00       	mov    $0x0,%eax		// eax=0
    11aa:	e8 a1 fe ff ff       	callq  1050 <printf@plt>	// printf(rdi, esi, edx, ecx)
    11af:	b8 00 00 00 00       	mov    $0x0,%eax		// eax=0
    11b4:	c9                   	leaveq 
    11b5:	c3                   	retq   
    11b6:	66 2e 0f 1f 84 00 00 	nopw   %cs:0x0(%rax,%rax,1)
    11bd:	00 00 00 

/*
 * arm
 */
000000000040055c <main>:
  40055c:	a9be7bfd 	stp	x29, x30, [sp, #-32]!
  400560:	910003fd 	mov	x29, sp
  400564:	5280ccc0 	mov	w0, #0x666                 	// #1638 w0=0x666
  400568:	b9001fa0 	str	w0, [x29, #28]			// [x29+28]=0x666
  40056c:	5280eee0 	mov	w0, #0x777                 	// #1911
  400570:	b9001ba0 	str	w0, [x29, #24]			// [x29+24]=0x777
  400574:	b9401fa1 	ldr	w1, [x29, #28]			// w1=0x666
  400578:	b9401ba0 	ldr	w0, [x29, #24]			// w0=0x777
  40057c:	0b000020 	add	w0, w1, w0			// w0=0xddd
  400580:	b90017a0 	str	w0, [x29, #20]			// [x29+20]=0xddd
  400584:	90000000 	adrp	x0, 400000 <_init-0x3e8>
  400588:	911a0000 	add	x0, x0, #0x680			// x0=400680
  40058c:	b94017a3 	ldr	w3, [x29, #20]			// w3=0xddd
  400590:	b9401ba2 	ldr	w2, [x29, #24]			// w2=0x777
  400594:	b9401fa1 	ldr	w1, [x29, #28]			// w1=0x666
  400598:	97ffffae 	bl	400450 <printf@plt>		// printf(x0,w1,w2,s3)
  40059c:	b9401ba1 	ldr	w1, [x29, #24]			// w1=0x777
  4005a0:	b9401fa0 	ldr	w0, [x29, #28]			// w0=0x666
  4005a4:	4b000020 	sub	w0, w1, w0			// w0=0x111
  4005a8:	b90017a0 	str	w0, [x29, #20]			// [x29+20]=0x111
  4005ac:	90000000 	adrp	x0, 400000 <_init-0x3e8>
  4005b0:	911a4000 	add	x0, x0, #0x690			// x0=400690
  4005b4:	b94017a3 	ldr	w3, [x29, #20]			// w3=0x111
  4005b8:	b9401fa2 	ldr	w2, [x29, #28]			// w2=0x666
  4005bc:	b9401ba1 	ldr	w1, [x29, #24]			// w1=0x777
  4005c0:	97ffffa4 	bl	400450 <printf@plt>		// printf(x0, w1, w2, w3)
  4005c4:	52800000 	mov	w0, #0x0                   	// #0	
  4005c8:	a8c27bfd 	ldp	x29, x30, [sp], #32		
  4005cc:	d65f03c0 	ret

#endif
